package com.kedacom.demo.spring.websocket.client;

import java.io.IOException;
import java.util.concurrent.ExecutionException;

import com.kedacom.demo.spring.websocket.WebSocketClient;

public class WebSocketClientTest {

	public static void main(String[] args) throws IOException, InterruptedException, ExecutionException {
		String url = "ws://localhost:8080/demo-spring-websocket/websocket";

		WebSocketClient webSocketClient1 = new MyWebSocketClient(url);
		webSocketClient1.init();
		webSocketClient1.sendMessage("test1");
		webSocketClient1.sendMessage("测试1");

		WebSocketClient webSocketClient2 = new MyWebSocketClient(url);
		webSocketClient2.init();
		webSocketClient2.sendMessage("test2");
		webSocketClient2.sendMessage("测试2");

		webSocketClient1.destory();
		webSocketClient2.destory();
	}

}
